<template>
    <swiper>
        <div v-for="item, index in banners" :key="index" class="swiper-slide">
            <a :href="item.link">
                <img :src="item.image" alt="" @load="swiper">
            </a>
        </div>
        
    </swiper>
</template>


<script>
import Swiper from 'components/common/swiper/Swiper'

export default {
    components: {
        Swiper

    },
    props: {
        banners: {
            type: Array,
            default() {
                return []
            }
        }
    },
    data() {
        return{
            isLoad: false
        }  
    },
    methods: {
        swiper() {
            if (!this.isLoad) {
                this.$emit('swiper')
                this.isLoad = true
            }
            
        }
    }
}
</script>


<style scoped>

</style>